export function count(s: string, subs: string): number {
    let count = 0;
    let idx = s.indexOf(subs);
    while (idx >= 0) {
        count++;
        s = s.substring(idx + subs.length);
        idx = s.indexOf(subs);
    }
    return count;
}
